/PROG  T1D_T2P
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "T1 DP -> T2 PK";
PROG_SIZE	= 2100;
CREATE		= DATE 12-05-30  TIME 18:10:36;
MODIFIED	= DATE 15-05-26  TIME 14:03:00;
FILE_NAME	= T1D_T2P;
VERSION		= 0;
LINE_COUNT	= 51;
MEMORY_SIZE	= 2528;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:   ;
   2:  LBL[10] ;
   3:  UFRAME_NUM=0 ;
   4:  UTOOL_NUM=1 ;
   5:  IF DI[14:ATC UNCHUCK OK]=ON OR DI[26:TOOL #2]=OFF,JMP LBL[90] ;
   6:   ;
   7:J P[1:CLEAR] 30% CNT50    ;
   8:L P[2:APPROACH] 100mm/sec CNT50 ACC70    ;
   9:L P[3:APPROACH] 300mm/sec CNT50    ;
  10:L P[4:APPROACH] 300mm/sec FINE    ;
  11:L P[5:DROP] 100mm/sec FINE ACC50 DB    0.0mm,DO[20:TOOL1 POS]=ON    ;
  12:  DO[20:TOOL1 POS]=ON ;
  13:  DO[13:REQ ATC CHUCK]=OFF ;
  14:  DO[14:REQ ATC UNCHUCK]=ON ;
  15:  WAIT DI[14:ATC UNCHUCK OK]=ON    ;
  16:  WAIT   1.00(sec) ;
  17:  DO[14:REQ ATC UNCHUCK]=OFF ;
  18:L P[6:APPROACH] 100mm/sec FINE ACC50 DB    0.0mm,DO[20:TOOL1 POS]=OFF    ;
  19:L P[7:APPROACH] 300mm/sec CNT50    ;
  20:  WAIT DI[25:TOOL #1]=ON    ;
  21:L P[2:APPROACH] 300mm/sec CNT50    ;
  22:L P[1:CLEAR] 300mm/sec CNT50 ACC70    ;
  23:   ;
  24:J P[8:CLEAR] 50% CNT100    ;
  25:J P[9:CLEAR] 50% CNT50    ;
  26:L P[10:APPROACH] 100mm/sec CNT50 ACC70    ;
  27:L P[11:APPROACH] 300mm/sec CNT50    ;
  28:L P[12:APPROACH] 300mm/sec FINE    ;
  29:  DO[13:REQ ATC CHUCK]=OFF ;
  30:  DO[14:REQ ATC UNCHUCK]=ON ;
  31:  WAIT DI[14:ATC UNCHUCK OK]=ON    ;
  32:  WAIT    .50(sec) ;
  33:L P[13:PICK] 100mm/sec FINE ACC50 DB    0.0mm,DO[21:TOOL2 POS]=ON    ;
  34:  WAIT   1.00(sec) ;
  35:  DO[21:TOOL2 POS]=ON ;
  36:  DO[14:REQ ATC UNCHUCK]=OFF ;
  37:  DO[13:REQ ATC CHUCK]=ON ;
  38:  WAIT DI[13:ATC CHUCK OK]=ON    ;
  39:  WAIT   1.00(sec) ;
  40:L P[14:APPROACH] 100mm/sec FINE ACC50 DB    0.0mm,DO[21:TOOL2 POS]=OFF    ;
  41:L P[15:APPROACH] 300mm/sec CNT50    ;
  42:  WAIT DI[26:TOOL #2]=OFF    ;
  43:L P[16:APPROACH] 300mm/sec CNT50    ;
  44:L P[9:CLEAR] 200mm/sec CNT50 ACC70    ;
  45:J P[8:CLEAR] 50% CNT100    ;
  46:   ;
  47:  MOVE TO HOME    ;
  48:  END ;
  49:   ;
  50:  LBL[90] ;
  51:  MESSAGE[ERROR: T2 DETECT OR NOT] ;
/POS
P[1:"CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2819.548  mm,	Y =   984.478  mm,	Z =  -483.984  mm,
	W =  -179.998 deg,	P =     -.000 deg,	R =    91.710 deg,
	E1=    15.275 deg
};
P[2:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3232.842  mm,	Y =   770.000  mm,	Z = -1000.000  mm,
	W =  -179.999 deg,	P =    89.668 deg,	R =    90.000 deg,
	E1=    15.275 deg
};
P[3:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3229.156  mm,	Y =   764.402  mm,	Z = -1360.072  mm,
	W =  -180.000 deg,	P =    89.949 deg,	R =    90.000 deg,
	E1=    15.275 deg
};
P[4:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3230.131  mm,	Y =   511.977  mm,	Z = -1362.933  mm,
	W =   147.987 deg,	P =    89.452 deg,	R =    58.415 deg,
	E1=    14.799 deg
};
P[5:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3230.133  mm,	Y =   511.977  mm,	Z = -1441.171  mm,
	W =   147.986 deg,	P =    89.452 deg,	R =    58.415 deg,
	E1=    14.799 deg
};
P[6:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3230.134  mm,	Y =   698.698  mm,	Z = -1441.168  mm,
	W =   147.990 deg,	P =    89.452 deg,	R =    58.418 deg,
	E1=    14.799 deg
};
P[7:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3230.582  mm,	Y =   700.697  mm,	Z = -1256.696  mm,
	W =  -179.670 deg,	P =    89.667 deg,	R =    90.330 deg,
	E1=    15.275 deg
};
P[8:"CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  1964.311  mm,	Y =     -.007  mm,	Z =  -484.864  mm,
	W =   180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[9:"CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2908.144  mm,	Y = -1118.831  mm,	Z =  -484.036  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =   -87.804 deg,
	E1=    15.275 deg
};
P[10:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3232.821  mm,	Y =  -694.238  mm,	Z =  -900.000  mm,
	W =  -180.000 deg,	P =    89.668 deg,	R =   -90.000 deg,
	E1=    15.275 deg
};
P[11:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3229.527  mm,	Y =  -682.905  mm,	Z = -1277.000  mm,
	W =   179.420 deg,	P =    89.576 deg,	R =   -90.580 deg,
	E1=    15.275 deg
};
P[12:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3229.310  mm,	Y =  -616.545  mm,	Z = -1443.273  mm,
	W =   179.498 deg,	P =    89.575 deg,	R =   -90.503 deg,
	E1=    15.275 deg
};
P[13:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3229.308  mm,	Y =  -478.145  mm,	Z = -1443.273  mm,
	W =   179.495 deg,	P =    89.575 deg,	R =   -90.506 deg,
	E1=    15.275 deg
};
P[14:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3229.306  mm,	Y =  -484.064  mm,	Z = -1375.917  mm,
	W =   179.495 deg,	P =    89.576 deg,	R =   -90.506 deg,
	E1=    15.275 deg
};
P[15:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,	
	J1=   -20.135 deg,	J2=   -17.927 deg,	J3=    70.000 deg,
	J4=   -82.434 deg,	J5=  -108.718 deg,	J6=   -68.679 deg,
	E1=    15.275 deg
};
P[16:"APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  3232.821  mm,	Y =  -694.238  mm,	Z =  -900.000  mm,
	W =  -180.000 deg,	P =    89.668 deg,	R =   -90.000 deg,
	E1=    15.275 deg
};
/END
